package org.jeecg.common.modules.doctor.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.modules.doctor.entity.DoctorRegisterOperate;
import org.jeecg.common.modules.doctor.entity.DoctorRegisterRecord;
import org.jeecg.common.modules.doctor.mapper.DoctorMapper;
import org.jeecg.common.modules.doctor.mapper.DoctorRegisterOperateMapper;
import org.jeecg.common.modules.doctor.service.IDoctorRegisterOperateService;
import org.jeecg.common.modules.doctor.vo.DoctorReqVo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
 * @Description: doctor_register_hospital
 * @Author: jeecg-boot
 * @Date:   2020-12-18
 * @Version: V1.0
 */
@Slf4j
@Service
public class DoctorRegisterOperateServiceImpl extends ServiceImpl<DoctorRegisterOperateMapper, DoctorRegisterOperate> implements IDoctorRegisterOperateService {
    @Resource
    private DoctorRegisterOperateMapper doctorRegisterOperateMapper;

    @Override
    public Page<DoctorRegisterOperate> queryOperate(Page<DoctorRegisterOperate> page, String name,String phone, Integer status){
        return page.setRecords(doctorRegisterOperateMapper.queryOperate(page, name, phone,status));
    }

    @Override
    public List<DoctorRegisterOperate> operateList(){
        LambdaQueryWrapper<DoctorRegisterOperate> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(DoctorRegisterOperate::getDeleteStatus,0);
        return list(queryWrapper);
    }
}
